<?php
namespace app\common\model;
class FollowUser extends Base {
    protected $pk = 'id';
    
    //判断是否已经关注
    public function isFollowed($followUserId, $userId) {
        $rs = $this->field($this->pk)->where(['user_id' => $userId, 'follow_user_id' => $followUserId])->find();
        return $rs ? true : false;
    }
}